package com.cool.cloud.service.impl;

import com.cool.cloud.entity.BatchAddFileWeekCount;
import com.cool.cloud.entity.FileWeekCount;
import com.cool.cloud.service.FileWeekCountService;
import org.springframework.stereotype.Service;

/**
 * @InterfaceName: FileWeekCountServiceImpl
 * @Description: TODO
 * @author: laijunji
 * @date 2020/1/26 21:55
 * @Version: 1.0
 **/
@Service
public class FileWeekCountServiceImpl extends BaseService implements FileWeekCountService {
    /**
     * @return 影响行数
     * @Description 更新某一天某用户某类型文件数量统计结果
     * @author laijunji
     * @date 2020-02-25 17:19:31
     */
    @Override
    public int update(Integer day, Integer userid, Integer count, Integer type) {
        return fileWeekCountMapper.update(day, userid, count, type);
    }

    /**
     * @return 数量大小
     * @Description 获取某一天某用户某类型文件数量统计结果
     * @author laijunji
     * @date 2021-05-19 17:19:31
     */
    @Override
    public int getTypeCount(Integer day, Integer userid, Integer type) {
        return fileWeekCountMapper.getTypeCount(day, userid, type);
    }

    /**
     * @return FileWeekCount对象
     * @Description 查询某一天所有类型数据数量统计结果
     * @author laijunji
     * @date 2020-02-25 17:19:31
     */
    @Override
    public FileWeekCount queryOneWeek(Integer day, Integer userid) {
        return fileWeekCountMapper.queryOneWeek(day, userid);
    }

    /**
     * @return 影响行数
     * @Description 添加新注册用户的所有类型数据数量统计数据
     * @author laijunji
     * @date 2020-02-25 17:19:31
     */
    @Override
    public int addOneWeek(BatchAddFileWeekCount[] fileWeekCount) {
        return fileWeekCountMapper.addOneWeek(fileWeekCount);
    }
}